package cn.yr.search.service;


import cn.yr.common.core.domain.vo.PageVo;
import cn.yr.search.bean.ArticleDocBean;
import org.springframework.data.domain.Page;

import java.util.Iterator;
import java.util.List;

public interface ArticleElasticService {

    Boolean createIndex();

    Boolean deleteIndex();

    void save(ArticleDocBean docBean);

    void saveAll(List<ArticleDocBean> list);

    void delete(Long id);

    void update(ArticleDocBean articleDocBean);

    Iterator<ArticleDocBean> findAll();

    PageVo<ArticleDocBean> findByTitle(PageVo<ArticleDocBean> pageVo);

    PageVo<ArticleDocBean> find(PageVo<ArticleDocBean> pageVo);

    Page<ArticleDocBean> findByFirstCode(String firstCode);

    Page<ArticleDocBean> findBySecordCode(String secordCode);

    Page<ArticleDocBean> query(String key);

}
